import http from '@/utils/http'

export default {
  async get(id) {
    return await http.get(`permission/${id}`)
  },
  // 获取权限列表
  async getList(listQuery) {
    return await http.get('permissions', listQuery)
  },
  // 更新权限
  async update(user) {
    return await http.patch('permission', user)
  },
  // 新建权限
  async create(bean) {
    return await http.post('permission', bean)
  },
  // 删除权限
  async delete(id) {
    return await http.delete(`permission/${id}`)
  }
}
